#include "QROHost_P.h"

void QROHost::Private::valueToNet(QVariant& param){
    param = serilizeValue(param,[=](QObject* obj) ->ObjectID{
        return m_objectIdMap.value(obj,NullID);
    });
}

void QROHost::Private::valueFromNet(QVariant& param,int targetType){
    param = unserilizeValue(param,[=](ObjectID id) ->QObject*{
            if(!m_objectDataMap.contains(id)) return NULL;

            return m_objectDataMap.value(id)->obj;
        },targetType);
}
